package com.zp.thread;
/**
 * 用匿名内部类实现实现Runnable接口的方法
 */
public class ThreadTest3 {
	public static void main(String[] args) {
		Thread t1 = new Thread(new Runnable(){
			@Override
			public void run() {
				for(int i=0;i<100;i++){
					System.out.println("hello"+i);
				}
			}
		});
		t1.start();
		
		Thread t2 = new Thread(new Runnable(){
			@Override
			public void run() {
				for(int i=0;i<100;i++){
					System.out.println("welcome"+i);
				}
			}
		});
		t2.start();
	}
}
